home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct02060.geo / 00025.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.5 KB  |  201 lines

  1. on startMovie
  2.   Set_CDcounter(6)
  3.   Set_NEXT(1)
  4.   initLesson()
  5.   CheckForTagWd()
  6. end
  7.  
  8. on TheinitCursor
  9.   initCursorCastNum()
  10.   initCursorList(1)
  11.   set CursorCastNum to getCursor(2)
  12.   cursor([CursorCastNum, CursorCastNum + 1])
  13. end
  14.  
  15. on checkScreenStatus
  16.   CheckRollOver()
  17.   CheckSnakeStatus()
  18.   go(the frame)
  19. end
  20.  
  21. on BlinkNext
  22.   if (the timer > getTimer()) and not soundBusy(2) then
  23.     startTimer()
  24.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  25.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  26.     else
  27.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  28.     end if
  29.   end if
  30. end
  31.  
  32. on GoNext
  33.   if not get_Disabled() then
  34.     sound stop 2
  35.     if Get_NEXT() = 1 then
  36.       go("t1")
  37.     else
  38.       if Get_NEXT() = 2 then
  39.         go("t6")
  40.       else
  41.         GoNextMovie()
  42.         exit
  43.       end if
  44.     end if
  45.     Set_NEXT(Get_NEXT() + 1)
  46.   end if
  47. end
  48.  
  49. on stopMovie
  50.   sound stop 1
  51.   unLoad()
  52.   setEmptyCursor()
  53. end
  54.  
  55. on GoNextMovie
  56.   PlaySound("GOSOUND.SO1")
  57.   SaveHilite()
  58.   Add_CDcounter(1)
  59.   set cdNum to Get_CDcounter()
  60.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  61.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  62. end
  63.  
  64. on handleExit
  65.   go("reg mode")
  66.   repeat with i = 27 to 29
  67.     UpdateCursors(i, 0)
  68.   end repeat
  69. end
  70.  
  71. on ClickAddress theNum, theSprite
  72.   global currBtnVis
  73.   set currBtnVis to theNum
  74.   sound stop 2
  75.   puppetSprite(theSprite, 3)
  76.   repeat with i = 13 to 16
  77.     UpdateCursors(i, 3)
  78.   end repeat
  79.   set the castNum of sprite theSprite to the number of cast ("ADD" & theSprite & "_v")
  80.   UpdateCursors(theSprite, 0)
  81.   repeat with i = 27 to 28
  82.     UpdateCursors(i, 2)
  83.   end repeat
  84.   go("Info-" & theNum)
  85. end
  86.  
  87. on visibleText bool
  88.   set the visible of sprite 18 to bool
  89.   set the visible of sprite 19 to bool
  90.   set the visible of sprite 20 to bool
  91. end
  92.  
  93. on InitLamp
  94.   set the visible of sprite 33 to 0
  95.   set the visible of sprite 34 to 0
  96.   UpdateCursors(34, 0)
  97.   set the castNum of sprite 32 to the number of cast "lamp_Off"
  98.   UpdateCursors(32, 3)
  99. end
  100.  
  101. on unSetMouseEvents
  102.   global puppetList
  103.   set puppetList to []
  104.   repeat with i = 1 to 48
  105.     add(puppetList, the puppet of sprite i)
  106.     if not (the puppet of sprite i) then
  107.       set the puppet of sprite i to 1
  108.     end if
  109.   end repeat
  110.   play frame "outLamp"
  111. end
  112.  
  113. on setMouseEvents
  114.   global puppetList
  115.   set the mouseDownScript to EMPTY
  116.   set the mouseUpScript to EMPTY
  117.   set the keyDownScript to EMPTY
  118.   set the keyUpScript to EMPTY
  119.   repeat with i = 1 to 48
  120.     if getAt(puppetList, i) = 0 then
  121.       set the puppet of sprite i to 0
  122.     end if
  123.   end repeat
  124.   play done
  125. end
  126.  
  127. on dont
  128.   dontPassEvent()
  129. end
  130.  
  131. on HandleLamp
  132.   sound stop 1
  133.   sound stop 2
  134.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  135.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  136.     set the visible of sprite 33 to 0
  137.     set the visible of sprite 34 to 0
  138.     UpdateCursors(34, 0)
  139.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  140.     updateStage()
  141.     unSetMouseEvents()
  142.   else
  143.     set the castNum of sprite 32 to the number of cast "lamp_On"
  144.     UpdateCursors(34, 3)
  145.     set the visible of sprite 33 to 1
  146.     set the visible of sprite 34 to 1
  147.     updateStage()
  148.     PlaySound("NCT02060.T01")
  149.     displayTip(34)
  150.   end if
  151.   updateStage()
  152. end
  153.  
  154. on displayTip theExitBtnSp
  155.   global exitTheLoop
  156.   set exitTheLoop to 0
  157.   set the mouseDownScript to "dont"
  158.   set the mouseUpScript to "dont"
  159.   set the keyDownScript to "dont"
  160.   set the keyUpScript to "dont"
  161.   set the exitLock to 0
  162.   repeat while not exitTheLoop
  163.     if the mouseCast = the number of cast "EXITLAMP" then
  164.       set the cursor of sprite 48 to [404, 405]
  165.     else
  166.       set the cursor of sprite 48 to [400, 401]
  167.     end if
  168.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  169.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  170.     end if
  171.   end repeat
  172.   set the exitLock to 1
  173.   set the cursor of sprite 48 to 0
  174.   HandleLamp()
  175. end
  176.  
  177. on switchExitLampButt spriteNum, castDown
  178.   global exitTheLoop
  179.   set flag to 0
  180.   set SaveCast to the castNum of sprite spriteNum
  181.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  182.   repeat while the mouseDown
  183.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  184.   end repeat
  185.   if flag = 1 then
  186.     set exitTheLoop to 1
  187.   end if
  188. end
  189.  
  190. on swapExitLampCast spriteNum, SaveCast, castDown
  191.   if rollOver(spriteNum) then
  192.     set the castNum of sprite spriteNum to the number of cast castDown
  193.     updateStage()
  194.     return 1
  195.   else
  196.     set the castNum of sprite spriteNum to the number of cast SaveCast
  197.     updateStage()
  198.     return 0
  199.   end if
  200. end
  201.